package kpython.backend.ir.tree;

public class Operation extends Expr {
	public final String[] operator = {"*", "+", "-", "/", "mod"};
	public static final int plus = 0, minus = 1, multip = 2, divide = 3, rest = 4;
	public int type = -1;
	public Expr left = null;
	public Expr right = null;

	public void printTree(String tab) {
		System.out.println(tab+this.getClass().getSimpleName());
		left.printTree(tab+"\t");
		right.printTree(tab+"\t");
	}
	
	public Object accept(IRTreeVisitor visitor, Object data) {
		return visitor.visit(this, data);
	}
	
	public String toString() {
		return this.getClass().getSimpleName();
	}
}
